﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Playables.PlayableOutput
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

#nullable disable
namespace UnityEngine.Playables
{
  /// <summary>
  ///   <para>See: Playables.IPlayableOutput.</para>
  /// </summary>
  [RequiredByNativeCode]
  public struct PlayableOutput : IPlayableOutput, IEquatable<PlayableOutput>
  {
    private PlayableOutputHandle m_Handle;
    private static readonly PlayableOutput m_NullPlayableOutput = new PlayableOutput(PlayableOutputHandle.Null);

    /// <summary>
    ///   <para>Returns an invalid PlayableOutput.</para>
    /// </summary>
    public static PlayableOutput Null => PlayableOutput.m_NullPlayableOutput;

    [VisibleToOtherModules]
    internal PlayableOutput(PlayableOutputHandle handle) => this.m_Handle = handle;

    public PlayableOutputHandle GetHandle() => this.m_Handle;

    public bool IsPlayableOutputOfType<T>() where T : struct, IPlayableOutput
    {
      return this.GetHandle().IsPlayableOutputOfType<T>();
    }

    public System.Type GetPlayableOutputType() => this.GetHandle().GetPlayableOutputType();

    public bool Equals(PlayableOutput other) => this.GetHandle() == other.GetHandle();
  }
}
